{% extends "styles/style_base.html" %}{% load i18n static%}
{% block content %}
    <h2>{% trans "Upload Style" %}</h2>
    <p class="help">{% trans "To upload a new style, you can specify the xml file in this form." %}</p>

    {% if form.non_field_errors %}
    <div class="alert alert-error">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        {% for error in form.non_field_errors %}
            <p>{{ error }}</p>
        {% endfor %}
    </div>
    {% endif %}

    <form method="post" enctype="multipart/form-data">
        {% csrf_token %}
        {% include "styles/form_snippet.html" %}

        <div class="license-agreement">
            <label class="checkbox">
                <input type="checkbox" required> I confirm that I own these materials and have the rights to share them, including any embedded content, under the <a href="https://creativecommons.org/publicdomain/zero/1.0/" target="_blank">CC-0 license</a>.
            </label>
        </div>

        <button class="btn btn-primary" id="licenseAgreed" type="submit">{% trans "Upload" %}</button>
    </form>

    <script type="text/javascript" src="{% static 'js/resource_upload.js' %}"></script>

{% endblock %}